package com.day0426.validate;/*
 * @创建者：黄苟苟
 * @创建时间：2021/4/26   15:42
 * @Description描述
 **/

import com.day0426.user.Admin;

import java.util.logging.Logger;

public class PassWordVld extends GenericValidate {
    public PassWordVld(Object[] inner, Object input) {
        super(inner, input);
    }

    @Override
    public boolean check() {
        Logger logger= Logger.getLogger(Admin.class.getName());
        String inputStr=null;
        if (this.getInput()!=null&&this.getInner()!=null){
            try {
                inputStr=((String)this.getInput()).substring(2);

            }catch (Exception e){
                logger.info("密码的信息采集失败："+e.getMessage());
                return false;
            }
            for (int i = 0; i <this.getInner().length ; i++) {
                if (inputStr.equals(this.getInner()[i])){
                    return true;
                }
            }
        }return false;
    }
}